﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharePoint2007Migration.Exceptions
{
    public class NotFoundContentDatabaseException : Exception
    {
        string _contentDbName;

        public NotFoundContentDatabaseException(string ContentDbName)
        {
            _contentDbName = ContentDbName;
        }

        public override string Message
        {
            get
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine(String.Format("Unable to determine the connection string for your {0} database", _contentDbName));
                sb.AppendLine(String.Format("Please make sure that you are running this program into your SharePoint 2007 farm where the {0} content database belongs", _contentDbName));
                return sb.ToString();
            }
        }
    }
}
